{js:my97date}
<div class="headbar">
	<div class="position"><span>会员</span><span>></span><span>咨询管理</span><span>></span><span>评价管理</span></div>
	<div class="operating">
		<div class="search f_r">
			<form name="searchInput" action="{url:/}" method="get">
				<input type='hidden' name='controller' value='comment' />
				<input type='hidden' name='action' value='comment_list' />
				<select name="search[like]">
					<option value="u.username">评价人</option>
					<option value="goods.name">评价商品</option>
					<option value="c.order_no">订单号</option>
				</select>
				<input class="small" name="search[likeValue]" type="text" /><button class="btn" type="submit"><span class="sch">搜 索</span></button>
			</form>
		</div>
		<a href="javascript:void(0)" onclick="selectAll('check[]')"><button class="operating_btn" type="button"><span class="sel_all">全选</span></button></a>
		<a href="javascript:void(0)" onclick="delModel({form:'comment_list',msg:'确定要删除选中的记录吗？'})"><button class="operating_btn" type="button"><span class="delete">批量删除</span></button></a>
	</div>

	<form name="searchSelect" method="get" action="{url:/}">
		<input type='hidden' name='controller' value='comment' />
		<input type='hidden' name='action' value='comment_list' />
		<div class="searchbar">
			购买时间：<input class="small" type="text" name="search[c.time>=]" onfocus="WdatePicker()" />
			截止时间：<input class="small" type="text" name="search[c.time<=]" onfocus="WdatePicker()" />
			回复状态：<select name="search[c.recomment_time]"><option value="">不限</option><option value="=0">未回复</option><option value=">0">已回复</option></select>
			<button class="btn" type="submit"><span class="sel">筛 选</span></button>
		</div>
	</form>
</div>

<form action="{url:/comment/comment_del}" method="post" name="comment_list" onsubmit="return checkboxCheck('check[]','尚未选中任何记录！')">
<div class="content">
	<table class="list_table">
		<colgroup>
			<col width="30px" />
			<col width="100px" />
			<col width="220px" />
			<col width="110px" />
			<col width="75px" />
			<col width="95px" />
		</colgroup>

		<thead>
			<tr>
				<th>选择</th>
				<th>评价人</th>
				<th>评价商品</th>
				<th>评价时间</th>
				<th>是否回复</th>
				<th>操作</th>
			</tr>
		</thead>

		<tbody>
			{set:$page= (isset($_GET['page'])&&(intval($_GET['page'])>0))?intval($_GET['page']):1;}
			{query: name=comment as c join=left join goods as goods on c.goods_id eq goods.id left join user as u on c.user_id eq u.id fields=c.id,c.time,u.id as userid,u.username,goods.id as goods_id,goods.name as goods_name,c.recomment_time page=$page where=$where order = c.id desc}
			<tr>
				<td><input name="check[]" type="checkbox" value="{$item['id']}" /></td>
				<td><a href="{url:/member/member_edit/uid/$item[userid]}">{$item['username']}</a></td>
				<td><a href="{url:/site/products/id/$item['goods_id']}" target="_blank">{$item['goods_name']}</a></td>
				<td>{$item['time']}</td>
				<td>{if:$item['recomment_time']>0}已回复{else:}未回复{/if}</td>
				<td>
					<a href="{url:/comment/comment_edit/cid/$item[id]}"><img class="operator" src="{skin:images/admin/icon_check.gif}" alt="查看" /></a>
					<a href="javascript:void(0)" onclick="delModel({link:'{url:/comment/comment_del/check/$item[id]}'})"><img class="operator" src="{skin:images/admin/icon_del.gif}" alt="删除" /></a>
				</td>
			</tr>
			{/query}
		</tbody>
	</table>
</div>
{$query->getPageBar()}
</form>

<script type="text/javascript">
$(function()
{
	var searchData = {echo:JSON::encode($search)};
	for(var index in searchData)
	{
		$('[name="search['+index+']"]').val(searchData[index]);
	}
})
</script>
